<template>
  <Layout>
    <div class="flex flex-ac">
      <button class="block student1" @click="toStudent">经销商学员</button>
      <button class="block teacher" @click="toTeacher">SGMW员工</button>
      <button class="block student" @click="toStudent1">讲师</button>
    </div>
  </Layout>
</template>

<script>
import '@/assets/styles/index.scss'
import Layout from "./layout";
import { setToken, getToken } from "@/utils/auth";

export default {
  components: {
    Layout
  },
  data() {
    return {
      viewModel: {
        page: 1,
        pageSize: 8,
        total: 0,
        Title: "",
        OrderBy: "ID", //排序字段
        IsAsc: "" //是否升序
      },
      model: ""
    };
  },
  computed: {
    // 计算属性，只要相关联的值没有改变，直接返回，不再进行计算，与方法区别，缓存
  },
  created() {
    // 实例创建完成后执行的代码
     if (getToken()) {
      this.$router.push("/");
    }
  },
  methods: {
    toTeacher() {
      this.$router.push("/elogin");
    },
    toStudent() {
      this.$router.push("/jxslogin");
    },
    toStudent1() {
      this.$router.push("/gyslogin");
    }
  }
};
</script>
<style lang="scss" scoped>
.block {
  width: 264px;
  height: 324px;
  padding: 255px 0 0;
  box-sizing: border-box;
  font-size: 24px;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  text-align: center;
  transition: all 0.3s ease-in-out;
  border-radius: 16px;
  & + .block {
    margin-left: 46px;
  }
  &:hover {
    transform: scale(1.1363, 1.139);
    box-shadow: 0px 5px 17px 0 rgba(177, 177, 177, 0.62);
  }
}
.student1 {
  background: url("~@/assets/images/login/0_1wsls@2x.png") no-repeat center /
    cover;
}
.student {
  background: url("~@/assets/images/login/3_1wsxs@2x.png") no-repeat center /
    cover;
}
.teacher {
  background: url("~@/assets/images/login/3_1wsls@2x.png") no-repeat center /
    cover;
}
</style>
